# vllm_openai_completions.py
from openai import OpenAI
client = OpenAI(
    base_url="https://u344261-9171-85922780.westc.gpuhub.com:8443/v1",
    api_key="sk-xxx", # 随便填写，只是为了通过接口参数校验
)

chat_outputs = client.chat.completions.create(
    model="Qwen2-7B-Instruct",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "你好"},
    ]
)
print(chat_outputs)